Skip to content

Conversation

@ItsChaceD
Copy link
Collaborator

@ItsChaceD ItsChaceD commented Oct 21, 2025

Deprecates the preventScreenshots Android config option as FLAG_SECURE is now automatically applied when the privacy screen is enabled. We have to do this since adding and removing the flag dynamically results in a race condition.

This Pr also improves reliability of the privacy screen dialog handling across different navigation modes (gesture navigation, home button, recent apps). The dialog is used in cases where FLAG_SECURE doesn't fully protect content. This happens when using gesture navigation (onPause doesn't reliably trigger), or on newer Android devices where the recent apps menu does not use a snapshot and instead uses a live view fragment which will persist until the OS decides to cache it.

@ItsChaceD ItsChaceD requested a review from a team October 21, 2025 14:23
Copy link
Contributor

@OS-pedrogustavobilro OS-pedrogustavobilro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, tested and seems to be working fine.

I needed to change the dependencies on capacitor framework to ^7.0.0, because it was installing next= 8.0.0-alpha.3 which uses kotlin 2.2.20, but because other modules had 1.9.X it had an error (I had package-lock.json and node_modules cleared to simulate a fresh clone, otherwise you may not get this issue if you had 8.0.0-alpha.2 or older:

lass 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.2.0, but the compiler version 1.9.0 can read versions up to 2.0.0.

Don't know if this needs to be addressed in this PR, but leaving the remark.

@ItsChaceD
Copy link
Collaborator Author

Overall LGTM, tested and seems to be working fine.

I needed to change the dependencies on capacitor framework to ^7.0.0, because it was installing next= 8.0.0-alpha.3 which uses kotlin 2.2.20, but because other modules had 1.9.X it had an error (I had package-lock.json and node_modules cleared to simulate a fresh clone, otherwise you may not get this issue if you had 8.0.0-alpha.2 or older:

lass 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.2.0, but the compiler version 1.9.0 can read versions up to 2.0.0.

Don't know if this needs to be addressed in this PR, but leaving the remark.

I updated this PR to adjust the dependency versions since it should definitely be included in this release & It wasn't a big deal to make the changes here.

@OS-pedrogustavobilro
Copy link
Contributor

@ItsChaceD anything missing to merge this PR?

@ItsChaceD ItsChaceD merged commit a92d9bd into main Nov 6, 2025
4 checks passed
@ItsChaceD ItsChaceD deleted the fix/IONIC-58/android-inconsistent-hiding branch November 6, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants